package com.bawei.fuxi.ui.home;

import android.widget.ImageView;

import com.bawei.fuxi.R;
import com.bawei.fuxi.base.mvp.BaseView;
import com.bawei.fuxi.base.utils.GlideUtils;
import com.bawei.fuxi.entity.VideoEntity;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import androidx.annotation.NonNull;

public class VideoAdapter extends BaseQuickAdapter<VideoEntity.DataBean, BaseViewHolder> {
    public VideoAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, VideoEntity.DataBean dataBean) {
        ImageView imageView = baseViewHolder.getView(R.id.iv);
        GlideUtils.getInstance().loadRoundedImage(getContext(),dataBean.getHeadpath(),imageView,10);
        baseViewHolder.setText(R.id.tv,dataBean.getCaption()+"");
    }
}
